package com.jh.user.controller;

import java.io.Serializable;
import java.math.BigDecimal;

import static com.google.common.base.Strings.isNullOrEmpty;

public class PayBarMerchant implements Serializable {

    public static final String PROP_REQUEST_NO = "requestNo";
    public static final String PROP_MERCHANT_NO = "merchantNo";
    public static final String PROP_MERCHANT_NAME = "merchantName";
    public static final String PROP_SHORT_NAME = "shortName";
    public static final String PROP_CHANNEL_PRODUCT_CODE = "channelProductCode";
    public static final String PROP_BIND_MOBILE = "bindMobile";
    public static final String PROP_BIND_EMAIL = "bindEmail";
    public static final String PROP_ADDRESS = "address";
    public static final String PROP_ID_CARD_NO = "idCardNo";
    public static final String PROP_SETTLE_BANK_ACCOUNT_NO = "settleBankAccountNo";
    public static final String PROP_SETTLE_BANK_ACCOUNT_NAME = "settleBankAccountName";
    public static final String PROP_SETTLE_BANK_ACCOUNT_TYPE = "settleBankAccountType";
    public static final String PROP_SETTLE_BANK_NAME = "settleBankName";
    public static final String PROP_SETTLE_BANK_SUB_NAME = "settleBankSubName";
    public static final String PROP_SETTLE_BANK_ABBR = "settleBankAbbr";
    public static final String PROP_SETTLE_BANK_CHANNEL_NO = "settleBankChannelNo";
    public static final String PROP_SETTLE_BANK_CARD_PROVINCE = "settleBankCardProvince";
    public static final String PROP_SETTLE_BANK_CARD_CITY = "settleBankCardCity";
    public static final String PROP_SETTLEMENT_TYPE = "settlementType";
    public static final String PROP_DEBIT_RATE = "debitRate";
    public static final String PROP_DEBIT_CAP_AMOUNT = "debitCapAmount";
    public static final String PROP_CREDIT_RATE = "creditRate";
    public static final String PROP_CREDIT_CAP_AMOUNT = "creditCapAmount";
    public static final String PROP_WITHDRAW_DEPOSIT_RATE = "withdrawDepositRate";
    public static final String PROP_WITHDRAW_DEPOSIT_SINGLE_FEE = "withdrawDepositSingleFee";

    private static final long serialVersionUID = 4498435827621391802L;

    /**
     * 检查商户注册请求数据是否完整
     * @return 返回请求数据是否完整
     */
    public boolean checkRegisterDataIntegrity() {
        return !isNullOrEmpty(merchantName) && !isNullOrEmpty(shortName) &&
                !isNullOrEmpty(bindMobile) &&
                !isNullOrEmpty(bindEmail) && !isNullOrEmpty(address) &&
                !isNullOrEmpty(idCardNo) && !isNullOrEmpty(settleBankAccountNo) &&
                !isNullOrEmpty(settleBankAccountName) && !isNullOrEmpty(settleBankAccountType) &&
                !isNullOrEmpty(settleBankName) && !isNullOrEmpty(settleBankSubName) &&
                !isNullOrEmpty(settleBankAbbr) && !isNullOrEmpty(settleBankChannelNo) &&
                !isNullOrEmpty(settleBankCardProvince) && !isNullOrEmpty(settleBankCardCity) &&
                debitRate != null && creditRate != null && withdrawDepositRate != null &&
                withdrawDepositSingleFee != null;
    }


    // 商户id
    private String merchantId;

    // 商户号
    private String merchantNo;

    // 商户名称
    private String merchantName;

    // 商户简称
    private String shortName;

    // 绑定手机号
    private String bindMobile;

    // 邮箱
    private String bindEmail;

    // 居住地址
    private String address;

    // 证件号码
    private String idCardNo;

    // 结算银行卡号
    private String settleBankAccountNo;

    // 结算卡银行开户名
    private String settleBankAccountName;

    // 银行卡类型
    private String settleBankAccountType;

    // 结算卡银行名称
    private String settleBankName;

    // 结算卡开户支行名称
    private String settleBankSubName;

    // 结算卡银行缩写
    private String settleBankAbbr;

    // 结算卡开户行联行号
    private String settleBankChannelNo;

    // 结算卡开户省
    private String settleBankCardProvince;

    // 结算卡开户市
    private String settleBankCardCity;

    // 结算类型
    private String settlementType= "D0";

    // 借记卡费率
    private BigDecimal debitRate;

    // 借记卡封顶金额
    private BigDecimal debitCapAmount;

    // 贷记卡费率
    private BigDecimal creditRate;

    // 贷记卡封顶金额
    private BigDecimal creditCapAmount;

    // 提现费率
    private BigDecimal withdrawDepositRate;

    // 单笔提现手续费
    private BigDecimal withdrawDepositSingleFee;

    // 额外手续费
    private BigDecimal extraRate;

    public PayBarMerchant() {
        super();
    }

    public String getMerchantId() {
        return merchantId;
    }

    public void setMerchantId(String merchantId) {
        this.merchantId = merchantId;
    }

    public String getMerchantNo() {
        return merchantNo;
    }

    public void setMerchantNo(String merchantNo) {
        this.merchantNo = merchantNo;
    }

    public String getMerchantName() {
        return merchantName;
    }

    public void setMerchantName(String merchantName) {
        this.merchantName = merchantName;
    }

    public String getShortName() {
        return shortName;
    }

    public void setShortName(String shortName) {
        this.shortName = shortName;
    }

    public String getBindMobile() {
        return bindMobile;
    }

    public void setBindMobile(String bindMobile) {
        this.bindMobile = bindMobile;
    }

    public String getBindEmail() {
        return bindEmail;
    }

    public void setBindEmail(String bindEmail) {
        this.bindEmail = bindEmail;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getIdCardNo() {
        return idCardNo;
    }

    public void setIdCardNo(String idCardNo) {
        this.idCardNo = idCardNo;
    }

    public String getSettleBankAccountNo() {
        return settleBankAccountNo;
    }

    public void setSettleBankAccountNo(String settleBankAccountNo) {
        this.settleBankAccountNo = settleBankAccountNo;
    }

    public String getSettleBankAccountName() {
        return settleBankAccountName;
    }

    public void setSettleBankAccountName(String settleBankAccountName) {
        this.settleBankAccountName = settleBankAccountName;
    }

    public String getSettleBankAccountType() {
        return settleBankAccountType;
    }

    public void setSettleBankAccountType(String settleBankAccountType) {
        this.settleBankAccountType = settleBankAccountType;
    }

    public String getSettleBankName() {
        return settleBankName;
    }

    public void setSettleBankName(String settleBankName) {
        this.settleBankName = settleBankName;
    }

    public String getSettleBankSubName() {
        return settleBankSubName;
    }

    public void setSettleBankSubName(String settleBankSubName) {
        this.settleBankSubName = settleBankSubName;
    }

    public String getSettleBankAbbr() {
        return settleBankAbbr;
    }

    public void setSettleBankAbbr(String settleBankAbbr) {
        this.settleBankAbbr = settleBankAbbr;
    }

    public String getSettleBankChannelNo() {
        return settleBankChannelNo;
    }

    public void setSettleBankChannelNo(String settleBankChannelNo) {
        this.settleBankChannelNo = settleBankChannelNo;
    }

    public String getSettleBankCardProvince() {
        return settleBankCardProvince;
    }

    public void setSettleBankCardProvince(String settleBankCardProvince) {
        this.settleBankCardProvince = settleBankCardProvince;
    }

    public String getSettleBankCardCity() {
        return settleBankCardCity;
    }

    public void setSettleBankCardCity(String settleBankCardCity) {
        this.settleBankCardCity = settleBankCardCity;
    }

    public String getSettlementType() {
        return settlementType;
    }

    public void setSettlementType(String settlementType) {
        this.settlementType = settlementType;
    }

    public BigDecimal getDebitRate() {
        return debitRate;
    }

    public void setDebitRate(BigDecimal debitRate) {
        this.debitRate = debitRate;
    }

    public BigDecimal getDebitCapAmount() {
        return debitCapAmount;
    }

    public void setDebitCapAmount(BigDecimal debitCapAmount) {
        this.debitCapAmount = debitCapAmount;
    }

    public BigDecimal getCreditRate() {
        return creditRate;
    }

    public void setCreditRate(BigDecimal creditRate) {
        this.creditRate = creditRate;
    }

    public BigDecimal getCreditCapAmount() {
        return creditCapAmount;
    }

    public void setCreditCapAmount(BigDecimal creditCapAmount) {
        this.creditCapAmount = creditCapAmount;
    }

    public BigDecimal getWithdrawDepositRate() {
        return withdrawDepositRate;
    }

    public void setWithdrawDepositRate(BigDecimal withdrawDepositRate) {
        this.withdrawDepositRate = withdrawDepositRate;
    }

    public BigDecimal getWithdrawDepositSingleFee() {
        return withdrawDepositSingleFee;
    }

    public void setWithdrawDepositSingleFee(BigDecimal withdrawDepositSingleFee) {
        this.withdrawDepositSingleFee = withdrawDepositSingleFee;
    }

    public BigDecimal getExtraRate() {
        return extraRate;
    }

    public void setExtraRate(BigDecimal extraRate) {
        this.extraRate = extraRate;
    }
}
